﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ODP.Model
{
    public class QueryStringParameter
    {
        public string Name { get; set; }
        public string Value { get; set; }

        public QueryStringParameter(string name,string value)
        {
            Name = name;
            Value = value;
        }
    }

    public class ParameterComparer : IComparer<QueryStringParameter>
    {
        public int Compare(QueryStringParameter x, QueryStringParameter y)
        {
            if (x.Name == y.Name)
            {
                return string.Compare(x.Value, y.Value);
            }
            else
            {
                return string.Compare(x.Name, y.Name);
            }
        }
    }
}
